<template>
  <el-container class="home-container">
    <el-header>
      <span></span>
      <h2>后台管理系统</h2>
    </el-header>
    <el-container>
      <el-aside width="200px">
        <!-- 菜单区域 -->
        <el-menu
          default-active="user"
          background-color="#545c64"
          text-color="#fff"
          active-text-color="#ffd04b"
          router
          unique-opened
        >
          <el-submenu index="1">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span>导航一</span>
            </template>
            <el-menu-item index="user">选项1</el-menu-item>
          </el-submenu>
          <el-submenu index="2">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span>导航二</span>
            </template>
            <el-menu-item index="login">选项1</el-menu-item>
            <el-menu-item index="2-2">选项2</el-menu-item>
          </el-submenu>
          <el-submenu index="3">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span>导航三</span>
            </template>
            <el-menu-item index="3-1">选项1</el-menu-item>
            <el-menu-item index="3-2">选项2</el-menu-item>
          </el-submenu>
        </el-menu>
      </el-aside>
      <el-main>
        <!-- 内容区域 -->
        <router-view></router-view>
      </el-main>
    </el-container>
    <el-footer height="40px">备案号</el-footer>
  </el-container>
</template>

<script>
export default {}
</script>

<style scoped>
.home-container {
  height: 100%;
}
.el-header {
  background-color: aqua;
  display: flex;
  align-items: center;
}
.el-header span {
  display: inline-block;
  width: 40px;
  height: 40px;
  background: url(../assets/logo.png) no-repeat;
  background-size: contain;
}
.el-aside {
  background-color: #242c2f;
}
.el-footer {
  background-color: #999;
}
</style>
